

cc.Class({
    extends: cc.Component,

    properties: {

        DieAudio:{
            default:null,
            type:cc.AudioClip
        }
    },


    //    用户自定义函数
    //监听是否撞击了
    onCollisionEnter: function (other, self) {
        console.log('碰到了');
        cc.audioEngine.play(this.DieAudio,false,0.8)
        cc.systemEvent.emit("XiaohuiDici", '');
        cc.director.loadScene("OverScene");
    },



    onLoad :function () {

    },

    start:function () {
        var manager = cc.director.getCollisionManager();
        manager.enabled = true;
        // manager.enabledDebugDraw = true;
    },

});
